package com.study.preview.preview01.bank.account;

import ch.qos.logback.core.spi.ContextAware;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.stereotype.Component;

/**
 * @author sjw
 * @description
 * @date 2019-09-03 下午6:35
 */

@Component
public class Account implements InitializingBean {

    public int getInt(int a){
        return a+1;
    }

    //@Override
    public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
//        if("account".equals(beanName))
//        System.out.println("-----------------b------------------");
        //System.out.println(beanName+"------------");
        return bean;
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("------------------------");
    }
}
